import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { WorkflowController } from './controllers/workflow.controller';
import { WorkflowManagementController } from './controllers/workflow-management.controller';
import { WorkflowService } from './services/workflow.service';
import { WorkflowManagementService } from './services/workflow-management.service';
import { WorkflowTemplate, WorkflowTemplateSchema } from './schemas/workflow.schema';

@Module({
    imports: [
        MongooseModule.forFeature([
            {
                name: WorkflowTemplate.name,
                schema: WorkflowTemplateSchema,
                collection: 'workflow_templates'
            }
        ])
    ],
    controllers: [WorkflowController, WorkflowManagementController],
    providers: [WorkflowService, WorkflowManagementService],
    exports: [WorkflowService, WorkflowManagementService, MongooseModule]
})
export class WorkflowModule { }